package com.monolithiot.cdn.management.common.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 2018/11/20 Create by 郭文梁
 * Project
 * 项目实体类：对应一个文件夹下的一组文件
 *
 * @author 郭文梁
 * @date 2018/11/20
 */
@Data
@Table(name = "project")
public class Project {
    /**
     * id          INT(10)      NOT NULL AUTO_INCREMENT,PRIMARY KEY (id)
     * 项目ID
     */
    @Id
    @GeneratedValue(generator = "JDBC")
    @Column(name = "id", length = 10, nullable = false)
    private Integer id;
    /**
     * 创建用户ID
     * userId      INT(10)      NOT NULL,
     */
    @Column(name = "userId", length = 10, nullable = false)
    private Integer userId;
    /**
     * 上下文路径
     * contextPath VARCHAR(100) NOT NULL,
     */
    @Column(name = "contextPath", length = 100, nullable = false)
    private String contextPath;
    /**
     * 项目名称
     * name        VARCHAR(100) NOT NULL,
     */
    @Column(name = "name", length = 100, nullable = false)
    private String name;
    /**
     * 项目描述
     * note        VARCHAR(255) NULL,
     */
    @Column(name = "note")
    private String note;
    /**
     * zip文件路径
     * zipFile     VARCHAR(100) NOT NULL,
     */
    @Column(name = "zipFile", length = 100)
    private String zipFile;
    /**
     * 解压路径
     * targetPath  VARCHAR(100) NOT NULL,
     */
    @Column(name = "targetPath", length = 100, nullable = false)
    private String targetPath;
    /**
     * 项目创建时间
     * createTime  DATETIME     NOT NULL,
     */
    @Column(name = "createTime", nullable = false)
    private Date createTime;
}
